home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!usenet
- From: sconnors@teleport.com (Steve)
- Newsgroups: comp.lang.c
- Subject: New (but motivated) C user looking for help . . .
- Date: 28 Feb 1996 07:32:08 GMT
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Message-ID: <4h10do$mqh@maureen.teleport.com>
- NNTP-Posting-Host: ip-pdx08-37.teleport.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.7
-
- Hello,
-
- I'm trying to write a program that will gather an
- ip address, and a subnet mask typed in at the
- keyboard, and do a bitwise AND to view the result.
-
- I am not lazy, and have been working on this for
- a while, but am kinda lost. I can prompt for and
- gather the input, but am at a loss to figure out
- the best way to deal with it.
-
- First I thought I could bring the dotted octet in
- as an integer, but quickly found that I could not.
-
- What I have done now is create char arrays for both
- the ip, and subnet. I planned to break the strings
- up and convert the fields between the periods back
- into (int ?) in order to do the AND.
-
- I am rambling, but am I on the right track? If there
- is a better way; just a hint will do, I want to
- LEARN how to program, not copy someone elses work.
-
- Please respond via e-mail to:
-
- sconnors@teleport.com
-
- Thanks!
-
-